#pragma once
#include <iostream>
#include <vector>
#include "Core.h"
using namespace std;

class Map {
private:
	vector<Core> cores;
	int width;
	int height;
	int length;
	int availableCores;
public:
	Map(int length = 1, int height = 1,int width = 1,double es = 10,double is = 1,double os = 1, int fraction = 0,string powerPrefix="");
	int getWidth();
	int getHeight();
	int getLength();
	bool turnOnCore(InvokedTask task,Vertex ver);
	bool turnOffCore(Vertex ver);
	int getAvailableCores();
	Core* getSpecificCore(Vertex v);
	Core* getSpecificCore(int index);
	int toIndex(Vertex v);
	Vertex toVertex(int i);
	void showMap();
	void savePower(string filePrefix="");
};
